-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(world,store): add initialize method, initialize core tables in core module #1472
Conversation
🦋 Changeset detectedLatest commit: 59796f2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 28 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@@ -50,6 +51,7 @@ contract CoreModule is Module { | |||
} | |||
|
|||
function installRoot(bytes memory) public override { | |||
StoreCore.registerCoreTables(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wondering if this should be in _registerCoreTables
.changeset/tricky-beds-kiss.md
Outdated
--- | ||
"@latticexyz/cli": patch | ||
"@latticexyz/store": patch | ||
"@latticexyz/world": patch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we add another changeset for #1385?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ohh true forgot it there. Could do that in a separate followup though, this PR doesn't actually use the WorldFactory
yet (because calling initialize
in a separate transaction is supported it's not strictly necessary.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wooo 4kb is a good chunk of savings
.changeset/tricky-beds-kiss.md
Outdated
|
||
- The `StoreRead` contract no longer calls `StoreCore.initialize` in its constructor. | ||
`StoreCore` consumers are expected to call `StoreCore.initialize` and `StoreCore.registerCoreTable` in their own setup logic. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The `StoreRead` contract no longer calls `StoreCore.initialize` in its constructor. | |
`StoreCore` consumers are expected to call `StoreCore.initialize` and `StoreCore.registerCoreTable` in their own setup logic. |
moving this to its own changeset bc it's the only major
change
purpose is to save a lot of bytecode in the
World
andWorldFacory
contracts